
package multiThreaded;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.util.Set;
import java.util.Map.Entry;

import singleThreaded.Reporter;

/**
 * Reporter thread for the web spider.
 * @author DoubleS
 * @version 1.0
 */
public class ReporterThread extends Reporter implements Runnable
{
  /**
   * Construct a reporter thread object.
   * @param the_entry_set The entry set of keywords.
   * @param the_num_of_pages The number of pages that have been parsed so far.
   * @param the_num_of_words The number of words found so far.
   * @param the_num_of_links The number of links retrieved so far.
   * @param the_link The current link.
   * @param the_limit The max number of pages that needs to be crawled.
   * @param the_time_elapsed The time elapsed.
   */
  public ReporterThread(final Set<Entry<String, Integer>> the_entry_set,
                        final int the_num_of_pages, final int the_num_of_words,
                        final int the_num_of_links, final String the_link,
                        final int the_limit, final double the_time_elapsed)
  {
    super(the_entry_set, the_num_of_pages, the_num_of_words, the_num_of_links, the_link,
          the_limit, the_time_elapsed);
  }

  /**
   * Run the reporter.
   */
  public void run()
  {
    //System.out.println("I'm in the Reporter Thread");
    System.out.println(this.report());
  }


}
